package com.ssh.dao;

import com.ssh.domain.Product;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by H-209-FX-XY on 2018/4/10.
 */
@Repository
public class ProductDao extends BaseDao{

    public void save(Product product){
        hibernateTemplate.save(product);
    }

    public List<Product> findAll(){
        String sql  = "from Product ";
        return (List<Product>) hibernateTemplate.find(sql);
    }
}
